TURBO BASIC COMMAND LISTCompiled and Translated byDave and Laura Yearke This documentation is provided by theWestern New York Atari Users Group andmay be reprinted freely provided thiscredit is included. In case you've just landed from Mars,or just plain haven't heard yet, TURBOBASIC is the exciting new PublicDomain Basic Interpreter that werecieved from the Atari Users Group inHolland. It works on the XL or XEseries of Atari computers. It's almosttoo good to be true and should be adefinite must for all XE or XL Atariowners. Turbo BASIC, in addition to offering42 more commands and 22 more functionsthan Atari BASIC, gives the user 1603more bytes of program space by"hiding" part of itself under theXL/XE's operating system. It alsoruns 3 times faster than Atari BASIC,includes most DOS commands, hasadvanced graphics and programmingfunctions, and is insensitive to lowercase or inverse characters for mostcommands.TURBO BASIC COMMANDS (note: these arenew keywords; watch for conflict withold programs)->DISK I/OBLOAD BLOAD "D:name" Binaryloads file 'name' (DOS option L with/N).BRUN BRUN "D:name" Binaryload and run file 'name' (DOS optionL).DELETE DELETE "D:name" Deletesthe file 'name' (DOS option D).DIR DIR Diskdirectory (DOS option A). DIR "Dn:*.*" Directory of drive 'n', note thatwildcard extenders may be used.LOCK LOCK "D:name" Locksthe file 'name' (DOS option F).RENAME RENAME "D:old,new" Renamesthe file 'name' (DOS option E).UNLOCK UNLOCK "D:name" Unlocksthe file 'name' (DOS option G).->GRAPHICSCIRCLE CIRCLE x,y,r Plots acircle with center at x,y and radiusr. CIRCLE x,y,r,r2 R2 is anoptional "vertical radius" for truecircles or ellipses.CLS CLS Clearsthe screen. CLS #6 Clearscreen opened in channel 6.FCOLOR FCOLOR n Determines fill color.FILLTO FILLTO x,y A fillcommand analagous to the BASICcommands "POSITION x,y: XIO18,#6,0,0,"S:"PAINT PAINT x,y Anothertype of fill command, this one is arecursive routine that will fill anyclosed object as long as x,y areinside it.TEXT TEXT x,y,a$ bit-blocks text in a$ at x,y. MEMORYDPOKE DPOKE m,v Pokeslocation m,m+1 with 2-byte integer v(0-65535).DPEEK DPEEK(m) Double-PEEK of m,m+1.MOVE MOVE m,m1,m2 Blocktransfer; moves m2 (number of bytes)from starting position m to newstarting position m1.-MOVE -MOVE m,m1,m2 Same asMOVE but copies starting with the lastbyte of the block.BPUT BPUT #n,adr,len BlockPut; same as FOR I=0 TO len-1:PUT#n,PEEK (adr+I):NEXT IBGET BGET #n,adr,len BlockGet; same as FOR I=0 TO len-1:GET#N,A: POKE adr+I):NEXT I%PUT %PUT #n,a Untilnow, there was no convenient way toput numeric values onto disk orcassette files other than by usingPRINT, which converted them to stringsfirst, a slow and cumbersome process. %PUT puts the number to the device "asis," in 6-byte FP format.%GET %GET #n,A Get anumber stored with %PUT from thedevice and store it in variable 'A'. Again, this is <much> faster thanusing "INPUT #n, A".->STRUCTURED PROGRAMMINGREPEAT REPEAT Start aREPEAT-UNTIL loop.UNTIL UNTIL <c> Terminate when condition <c> met.WHILE WHILE <c> Start aWHILE-WEND loop that will run as longas condition <c> is met eg. 10 WHILE X<255WEND WEND Terminate a WHILE-END loop.ELSE ELSE Optionalextension for IF. The IF conditionmust not be followed by a "THEN", butterminated by end-of-line or colon.ENDIF ENDIF Ends anIF-ELSE-ENDIF or IF-ELSE condition. Note that this allows an IF conditionto span more than one BASIC line,provided the "IF" statement isstructured like so: 10 IF X > 10 20 PRINT X-10 30 GO# TOO_BIG 40 ELSE 50 PRINT X 60 GO# X_IS_OK 70 ENDIF(Note also the use of line labels inthe GOTO statements.)DO DO Startsan "infinite" DO loop.LOOP LOOP Cycleback to the start of a DO loop.EXIT EXIT Exit aDO-LOOP loop.PROC PROC name Startdefinition of procedure.ENDPROC ENDPROC Enddefinition of procedure.EXEC EXEC name Executeprocedure 'name'. 10 EXEC SETUP 20 END 30 PROC SETUP 40 CLS:POKE 710,12:POKE 709,0 50 POKE 729,15:POKE 730,3 60 ENDPROC->GENERAL PROGRAMMINGPAUSE PAUSE n Pauseprocessing for n/50 seconds.RENUM RENUM n,i,j Renumberthe program starting at line 'n',firstnumber is 'i', increment is 'j'. Thisfunction will handle GOTOs, TRAPs, andall other line references except thosewhich involve variables or computedvalues.DEL DEL n,i Deletelines n-i.DUMP DUMP Displayall variables and values. For numericarrays, the numbers are the DIMedvalues plus one. For strings, thefirst number is the current LENgth ofit and the second number is the DIMedsize of it. DUMP also lists procedurenames and labels with their linevalues. DUMP name DUMP todevice 'name', such as "P:" or"D:DUMP.DAT".TRACE TRACE Traceprogram during execution. TRACE - Turnstrace mode off (Default).DSOUND DSOUND n,f,d,v Form ofSOUND which activates channel-pairingfor increased frequency range. DSOUND Turnsoff all sounds.GO TO GO TO n Alternate form of GOTO.*L *L Turnline-indent on (Default). *L - Turnsline-indent off.*F *F (or *F +) Specialmode for FOR..NEXT loops whichcorrects a bug in Atari BASIC. Seemsthat in Atari BASIC, an "illegal"reverse loop like "FOR X=2 TO 1:PRINTX:NEXT X" will execute once eventhough the condition is met initially(X is already greater than 1). TurboBASIC fixes this bug, but leaves itavailable for Atari BASIC programswhich may take advantage of it. *F - Turnsoff the special FOR..NEXT mode to makeTurbo BASIC act like Atari BASIC.*B *B (or *B +) Commandwhich allows the break key to betrapped via the "TRAP" command withina program. *B - Turnsoff the special BREAK key mode.-- -- Specialform of REM which puts 30 dashes in aprogram listing.->LINE LABELS# # name Assignsthe current line number to the label'name'. This is a convenient way toget around the problem of renumberingwhen using variables as line numbers. Labels can be thought of as a specialform of variable, as they occupy thevariable name table along with the"regular" variables. We also believethat the number of variables allowedhas been increased from 128 to 256 toallow for the addition of theselabels.GO# GO# name Analagous to the GOTO command.CLOSE CLOSE Closechannels 1-7.DIM DIM a(n) Willautomatically assign a value of zeroto all elements of the numeric arraybeing dimensioned, and null charactersto all elements of a string (The LENis still variable, however, andinitially zero).GET GET name Wait fora key press, assign the value to'name'. Same as "OPEN #7,4,0,"K:":GET#7,name:CLOSE #7".INPUT INPUT "text";a,b... Prints'text' as a prompt before asking forvariable(s), a la Microsoft-BASIC.LIST LIST n, Listprogram from line 'n' to end.ON ON a EXEC n1,n2,...Variation of ON...GOSUB forPROCedures. N1, n2 and so on arepre-defined procedures. ON a GO# n1,n2,... Similarto ON...GOTO except that line labelsare used instead of line numbers.POP POP Thiscommand now pops the runtime stack forall four types of loops.PUT PUT n Same as"PRINT CHR$(n)";RESTORE RESTORE #name Restoresthe data line indicated by the LABEL'name'.RND RND Parentheses are no longer needed atthe end of this command, but it willstill work if they are there.SOUND SOUND Turn offall sounds.TRAP TRAP #name